<?php

namespace Schivei\Entities\Usuarios;

/**
 * Description of Usuario
 *
 * @author elton.schivei
 *
 * [EntityMap(Table:'usuario',Base:'\Schivei\Entities\ABase')]
 */
class Usuario extends \Schivei\Entities\ABase implements \Schivei\Entities\Usuarios\IUsuario
{
    /**
     * [PropertyMap(Id:'identity',Column:'id')]
     * @var \System\Types\Integer
     */
    protected $_id = 0;

    /**
     * [PropertyMap(Type:'\System\Types\String',Column:'name')]
     * @var \System\Types\String
     */
    protected $_name = null;

    function __construct()
    {
        parent::__construct($this);
    }

    /**
     * @return \System\Types\String
     */
    public function GetName()
    {
        return $this->_name;
    }

    /**
     * @param \System\Types\String $name
     */
    public function SetName(\System\Types\String $name)
    {
        $this->_name = $name;
    }

    public function __set($name, $value)
    {
        $name = '_' . \lcfirst($name);

        $this->{$name} = $value;
    }

    public function __get($name)
    {
        $name = '_' . \lcfirst($name);

        return $this->{$name};
    }

}
